package cn.tedu.csmall.server.service.impl;

import cn.tedu.csmall.server.mapper.AlbumMapper;
import cn.tedu.csmall.server.pojo.dto.AlbumAddNewDTO;
import cn.tedu.csmall.server.pojo.entity.Album;
import cn.tedu.csmall.server.service.IAlbumService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author lixin
 * @Date 2022/9/4
 */
@Service
public class AlbumServiceImpl implements IAlbumService {
    @Autowired
    private AlbumMapper mapper;

    @Override
    public void addNew(AlbumAddNewDTO albumAddNewDTO) {
        Album album = new Album();
        BeanUtils.copyProperties(albumAddNewDTO, album);
        mapper.addNew(album);
    }
}
